<template>
    <div>
        <iframe id="iframe" :src="src"  scrolling="yes" frameborder="0"  class="iframe"></iframe>
    </div>
</template>
<script>
const defaultSettings = require('@/settings.js')
export default {
    name: 'App',
    data(){
        return {
            src:defaultSettings.devApiUrl+"swagger-ui.html#/"
        }
    },
    mounted() {
        const oIframe = document.getElementById('iframe');
        const deviceWidth = document.documentElement.clientWidth;
        const deviceHeight = document.documentElement.clientHeight;
        oIframe.style.width = (Number(deviceWidth)-220) + 'px'; //数字是页面布局宽度差值
        oIframe.style.height = (Number(deviceHeight)-130) + 'px'; //数字是页面布局高度差
    }
}
</script>